package com.ruoyi;

import com.ruoyi.common.utils.spring.SpringUtils;
import com.ruoyi.framework.web.domain.server.Sys;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.core.env.Environment;

/**
 * 启动程序
 * 
 * @author ruoyi
 */
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
public class RuoYiApplication
{

    public static void main(String[] args)
    {
        // System.setProperty("spring.devtools.restart.enabled", "false");
        SpringApplication.run(RuoYiApplication.class, args);
        Environment environment = SpringUtils.getBean(Environment.class);
        String profileInfo = environment.getProperty("spring.config.activate.on-profile");
        if (profileInfo.equals("local"))
        {
            System.out.println("本地环境配置启动");
        }
        if (profileInfo.equals("prod"))
        {
            System.out.println("生产环境配置启动");
        }
        System.out.println("(♥◠‿◠)ﾉﾞ  爱脑行动启动成功   ლ(´ڡ`ლ)ﾞ  \n");
    }
}
